﻿
namespace Sgs.Model
{

   
    class Card
    {
        public delegate void CardEffect(Player player);

        public int Index;
        public string Name;
        public CardType Type;
        public CardColor Color;
        public CardPoint Point;
        public CardEffect Effect;

        public enum CardType
        {
            基本, 装备, 锦囊
        }

        public enum CardColor
        {
            红桃, 方块, 黑桃, 梅花
        }

        public enum CardPoint
        {
            A, N2, N3, N4, N5, N6, N7, N8, N9, N10, J, Q, K
        }

        public Card(string Name, int Index, CardColor Color, CardPoint Point, CardType Type, CardEffect Effect = null)
        {
            this.Index = Index;
            this.Name = Name;
            this.Color = Color;
            this.Point = Point;
            this.Type = Type;
            this.Effect = Effect;
        }

        public override string ToString()
        {
            return $"名称={Name} 类型={Type} 花色={Color} 点数={PointToNumber()}";
        }

        public int PointToNumber()
        {
            return (int)Point + 1;
        }
    }
}
